home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
commodore-users-of-norman
/
CUON_10_(11-1984).d64
/
computer intro
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
7KB
|
222 lines
5 PRINT"[147]"
10 REM INTRODUCTION TO COMPUTERS
20 REM BY TIM KNIGHT
30 PRINTTAB(3)"INTRODUCTION TO THE COMMODORE 64"
35 PRINT:FOR I = 1 TO 40:PRINTCHR$(209);:NEXT:PRINT
40 PRINT" THE COMMODORE 64 IS ONE OF THE MOST"
50 PRINT"POWERFUL COMPUTERS EVER MADE FOR THE"
60 PRINT"HOME COMPUTER USER. THIS PROGRAM WILL"
70 PRINT"DEMONSTRATE JUST A FEW OF ITS "
80 PRINT"CAPABILITIES AS A MACHINE FOR LEARNING,"
90 PRINT"PLAYING GAMES, AND EXPLORING COMPUTERS."
95 PRINT:FOR I = 1 TO 40:PRINTCHR$(218);:NEXT
100 PRINT" TO GET THE MENU FOR THE COMPUTER"
110 PRINT"DEMONSTRATIONS YOU CAN SEE, JUST PRESS"
120 PRINT"THE LETTER 'C' TO CONTINUE."
125 FOR I = 1 TO 40:PRINTCHR$(218);:NEXT:PRINT
130 GET A$:IF A$<>"C" THEN 130
140 PRINT"[147]"
150 PRINT"INTRODUCTION TO THE COMMODORE 64 - DEMOS";
160 PRINT:FOR I =1 TO 40:PRINT CHR$(185);:NEXT:PRINT
170 PRINT"(1) COLORS ON THE COMMODORE"
180 PRINT"(2) COMMODORE CHARACTERS"
190 PRINT"(3) SUPER SPRITE!"
200 PRINT"(4)[160] MUSIC MAKER"
210 PRINT"(5) SOUNDS OF THE SIXTY-FOUR"
220 PRINT"(6) A SIMPLE AND BASIC GAME"
230 PRINT"(7) END PROGRAM"
240 PRINT:INPUT"PLEASE ENTER YOUR CHOICE";CH
250 IF CH<1 OR CH>7 THEN GOTO 240
260 ON CH GOSUB 1000,2000,3000,4000,5000,6000,7000
270 GOTO 140
1000 REM COLORS ON THE COMMODORE
1010 PRINT"[147]"
1020 PRINT" ONE OF THE COMMODRE'S MOST POWERFUL"
1030 PRINT"FEATURES IS ITS WIDE VARIETY OF COLORS."
1040 PRINT"YOU MAY CHANGE THE COLOR OF THE BORDER,"
1050 PRINT"(THE AREA AROUND THE TEXT YOU SEE HERE)"
1060 PRINT"THE BACKGROUND, AND EVEN THE TEXT"
1070 PRINT"ITSELF! TO SEE SOME OF THE NICE COLORS"
1080 PRINT"AVAILABLE ON THE COMMODORE, JUST WATCH"
1090 PRINT"THIS.......":FOR K = 1 TO 1000:NEXT
1100 S=53248: REM VIC CHIP REGISTER
1110 FOR I = 1 TO 20
1120 POKE S+32,INT(RND(1)*15): REM BORDER
1130 POKE S+33,INT(RND(1)*15): REM BACKGROUND
1131 FOR Z = 1 TO 500:NEXT
1135 NEXT
1140 GOSUB 10000
1150 POKE S+32,254:POKE S+33,246
1999 RETURN
2000 REM COMMODORE CHARACTERS
2010 PRINT"[147]"
2020 PRINTTAB(10)"COMMODORE CHARACTERS":PRINT
2030 PRINT" THE COMMDORE 64 IS CAPABLE OF "
2040 PRINT"PRODUCING A VARIETY OF CHARACTERS ON"
2050 PRINT"THE VIDEO SCREEN. SOME OF THE"
2060 PRINT"CHARACTERS AVAILABLE ARE:":PRINT
2070 PRINT"SYMBOLS AND NUMBERS:"
2080 FOR I = 33 TO 64:PRINTCHR$(I);" ";:NEXT:PRINT
2090 PRINT:PRINT"THE UPPER-CASE ALPHABET:"
2100 FOR I = 65 TO 90:PRINTCHR$(I);" ";:NEXT:PRINT
2110 PRINT:PRINT"GRAPHICS CHARACTERS:"
2120 FOR I = 96 TO 127:PRINTCHR$(I);" ";:NEXT:FOR I = 161 TO 191:PRINTCHR$(I);" ";:NEXT
2125 PRINT:PRINT
2130 GOSUB 10000
2999 RETURN
3000 REM SUPER SPRITE!
3001 RESTORE
3010 PRINT"[147]"
3020 PRINT" THE MOST POWERFUL GRAPHICS "
3030 PRINT"CAPABILITY ON THE SIXTY-FOUR IS THE"
3040 PRINT"POWER TO CREATE AND DISPLAY SPRITES,"
3050 PRINT"HIGH RESOLUTION CHARACTERS WHICH MAY"
3060 PRINT"BE MOVED TO AND AROUND ANY PART OF THE"
3070 PRINT"VIDEO SCREEN. THE COMPUTER CAN SET"
3080 PRINT"UP SINGLE-COLOR OR MULTI-COLOR SPRITES,"
3090 PRINT"BOTH HAVING HIGH RESOLUTION. THE "
3100 PRINT"COMMODORE CAN ALSO MANIPULATE UP TO"
3110 PRINT"EIGHT OF THEM, MOVING THEM AROUND THE"
3120 PRINT"SCREEN, DETECTING WHEN THEY COLLIDE "
3130 PRINT"WITH ONE ANOTHER, AND EVEN DETECTING"
3140 PRINT"WHEN ONE COLLIDES WITH THE BORDER OF"
3150 PRINT"THE SCREEN. TO SEE A SIMPLE SPRITE"
3160 PRINT"MOVING ACROSS THE SCREEN, JUST PRESS "
3170 PRINT"THE 'S' KEY FOR 'SPRITE'."
3180 GET A$:IF A$<>"S" THEN 3180
3190 PRINT"[147]"
3200 V=13*4096: REM VIC REGISTER
3210 POKE V+21,4: REM SPRITE TWO ENABLED
3220 POKE V+23,4: REM EXPAND IN Y-DIRECTION
3240 POKE 2042,13: REM SPRITE TWO POINTER
3250 FOR N= 0 TO 62:READ Q:POKE 830+N,Q:NEXT
3255 FOR TT=1 TO 3
3260 FOR X= 0 TO 200
3270 POKE V+23,4:POKE V+29,4
3280 POKE V+4,X:POKE V+5,X
3290 NEXT
3330 NEXT
3380 DATA 0,0,36,60,120
3390 DATA 36,32,72,36,56
3400 DATA 72,61,34,122,60
3410 DATA 32,120,0,0,0
3420 DATA 0,24,0,15,255
3430 DATA 240,63,255,252,249
3440 DATA 231,159,63,255,252
3443 DATA 7,255,224,0,24
3450 DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
3460 GOSUB 10000
3470 POKE V+21,0: REM DISABLE SPRITE
3999 RETURN
4000 REM MUSIC MAKER
4001 RESTORE:PRINT"[147]"
4002 FOR Q = 0 TO 62:READ II:NEXT
4003 READ NN
4010 S=54272
4020 FOR L = S TO S+24:POKE L,0:NEXT
4030 POKE S+5,9:POKE S+6,0
4040 POKE S+24,15
4045 PRINT" MUSIC ON THE COMMODORE IS EASY TO"
4046 PRINT"PLAY, AND CAN BE PRODUCED IN AN AMAZING"
4047 PRINT"NUMBER OF VARIATIONS. HERE'S A SHORT"
4048 PRINT"ONE-VOICE PIECE...":FOR T= 1 TO 2000:NEXT
4050 READ H,L,D
4060 IF H=333 THEN GOTO 4280
4070 POKE S+1,H:POKE S,L
4080 POKE S+4,33:FOR T=1 TO D:NEXT
4090 POKE S+4,32:FOR T= 1 TO 40:NEXT:GOTO 4050
4100 DATA 12,143,250,16,195,500
4110 DATA 12,143,250,10,143,250
4120 DATA 9,104,250
4130 DATA 8,97,250,7,233,500
4140 DATA 14,24,250,12,143,500
4150 DATA 12,143,250,18,209,500
4160 DATA 15,210,250,12,143,250
4170 DATA 11,48,250,9,104,250,8,97,500
4180 DATA 14,24,250,12,143,500
4190 DATA 12,143,250,21,31,500
4200 DATA 16,195,250,12,143,250,10,143,250
4210 DATA 8,97,250
4220 DATA 11,48,500,14,24,250
4230 DATA 16,195,500,15,210,225
4240 DATA 14,24,225,12,143,450
4250 DATA 15,210,350,18,209,350
4260 DATA 16,195,250,15,210,250
4270 DATA 16,195,750,333,333,333
4280 FOR L = S TO S+24:POKE L,0:NEXT
4290 GOSUB 10000
4999 RETURN
5000 REM SOUNDS OF THE SIXTY-FOUR
5010 PRINT"[147]"
5020 PRINT" BY UTILIZING THE POWERFUL "
5030 PRINT"SOUND CAPABILITIES OF THE COMMODORE"
5040 PRINT"COMPUTER, YOU CAN GENERATE AN AMAZING"
5050 PRINT"VARIETY OF DIFFERENT SOUNDS. HERE IS"
5060 PRINT"JUST ONE 'SIMPLE SAMPLE' OF A SOUND"
5070 PRINT"POSSIBLE ON THE COMMODORE 64..."
5090 S=54272
5100 FOR II=1 TO 2000:NEXT: REM DELAY
5110 FOR L = 0 TO 24:POKE S+L,0:NEXT
5120 POKE S,150:POKE S+1,10
5130 POKE S+5,24
5140 POKE S+22,104
5150 POKE S+23,1
5160 POKE S+24,79
5170 FOR N=1 TO 10
5180 POKE S+4,129
5190 FOR T= 1 TO 250:NEXT:POKE S+4,128
5200 FOR T = 1 TO 30:NEXT:NEXT
5210 POKE S+24,0
5500 GOSUB 10000
5999 RETURN
6000 REM A SIMPLE AND BASIC GAME
6010 PRINT"[147][160]"
6020 PRINTTAB(7)"A SIMPLE AND 'BASIC' GAME"
6030 PRINT
6040 PRINT" HERE IS A GAME WRITTEN IN THE BASIC"
6050 PRINT"LANGUAGE TO SHOW YOU HOW THE COMPUTER"
6060 PRINT"IS GIVEN INSTRUCTIONS TO PLAY EVEN"
6070 PRINT"THE SIMPLEST GAME. THIS PARTICULAR"
6080 PRINT"GAME IS CALLED 'HIGH-LOW'. ALL YOU HAVE"
6090 PRINT"TO DO IS GUESS A NUMBER BETWEEN 1 AND"
6100 PRINT"100. THE COMPUTER WILL TELL YOU IF"
6110 PRINT"YOU ARE 'HIGH' OR 'LOW', AND YOU SHOULD"
6120 PRINT"MAKE ANOTHER GUESS ACCORDINGLY, UNTIL"
6130 PRINT"YOU REACH THE CORRECT NUMBER. AT THAT"
6140 PRINT"POINT, THE COMMODORE 64 WILL TELL YOU"
6150 PRINT"HOW MANY GUESSES YOU TOOK TO GUESS"
6160 PRINT"THE RIGHT NUMBER. AT THAT TIME, YOU"
6170 PRINT"WILL BE SHOWN THE ACTUAL PROGRAM "
6180 PRINT"WHICH WAS MADE TO PLAY THE GAME..."
6190 PRINT:GOSUB 10000
6200 PRINT"[147]":N=INT(RND(1)*100)+1
6210 INPUT"ENTER YOUR GUESS";G
6220 C=C+1: REM COUNTS HOW MANY GUESSES
6225 IF G<N THEN PRINT"LOW":GOTO 6210
6230 IF G>N THEN PRINT"HIGH":GOTO 6210
6240 PRINT"CONGRATULATIONS! YOU GOT THE NUMBER"
6250 PRINT"RIGHT IN ";C;" GUESSES!"
6260 PRINT:INPUT"HIT RETURN TO SEE THE PROGRAM ITSELF";A:PRINT
6270 PRINT"10 N=INT(RND(1)*100)+1"
6280 PRINT"20 INPUT'ENTER YOUR GUESS';G"
6290 PRINT"30 C=C+1: REM COUNTS HOW MANY GUESSES"
6295 PRINT"40 IF G<N THEN PRINT'LOW':GOTO 20"
6300 PRINT"50 IF G>N THEN PRINT'HIGH':GOTO 20"
6310 PRINT"60 PRINT'CONGRATULATIONS! YOU GOT THE NUMBER'"
6320 PRINT"70 PRINT'RIGHT IN ';C;' GUESSES!'":PRINT
6330 GOSUB 10000
6999 RETURN
7000 REM END PROGRAM
7010 PRINT"[147]"
7020 PRINT" I HOPE THAT I SHOWED YOU SOME OF THE"
7030 PRINT"POWER THE COMMODORE HAS 'UNDER ITS"
7040 PRINT"KEYBOARD'. NOW IT'S YOUR TURN TO "
7050 PRINT"EXPERIMENT WITH THE COMPUTER AND LEARN"
7060 PRINT"TO MASTER THIS MACHINE WITH YOUR"
7070 PRINT"EXPERIENCE! GOOD LUCK!"
7080 PRINT:PRINT:END
10000 REM PRESS C TO CONTINUE
10010 PRINTTAB(9)"PRESS 'C' TO CONTINUE"
10020 GET A$:IF A$<>"C" THEN 10020
10030 RETURN